package IO.高效字节流;

import java.io.*;

public class 高效字节流 {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("C:\\Users\\mfg\\Desktop/mfg.jpg"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("D:/IOFile/test/mfg.jpg"));

        byte[] bytes = new byte[1024];
        int len = -1;
        while((len = bis.read(bytes)) != -1){
            bos.write(bytes);
            bos.flush();
        }
        bis.close();
        bos.close();

    }
}
